<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="提交日期" prop="arrangeDate">
        <el-date-picker clearable
          v-model="queryParams.arrangeDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择提交日期">
        </el-date-picker>
      </el-form-item>
      <!-- <el-form-item label="主班人员" prop="mainClass">
        <el-select v-model="queryParams.mainClass" placeholder="请选择主班人员" clearable>
          <el-option
            v-for="dict in dict.type.pd_worker_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="副班人员" prop="deputyClass">
        <el-select v-model="queryParams.deputyClass" placeholder="请选择副班人员" clearable>
          <el-option
            v-for="dict in dict.type.pd_worker_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="分院人员" prop="otherClass">
        <el-select v-model="queryParams.otherClass" placeholder="请选择分院人员" clearable>
          <el-option
            v-for="dict in dict.type.pd_worker_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item> -->
      <!-- <el-form-item label="提交时间" prop="arrangeTime">
        <el-date-picker clearable
          v-model="queryParams.arrangeTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择提交时间">
        </el-date-picker>
      </el-form-item> -->
      <el-form-item label="提交科室" prop="arrangeDept">
        <el-select v-model="queryParams.arrangeDept" placeholder="请选择提交科室" clearable>
          <el-option
            v-for="dict in dict.type.pd_dept_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="科室提交人" prop="deptPresenter">
        <el-input
          v-model="queryParams.deptPresenter"
          placeholder="请输入科室提交人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="需求范围" prop="demandType">
        <el-select v-model="queryParams.demandType" placeholder="请选择需求范围" clearable>
          <el-option
            v-for="dict in dict.type.pd_demand_type"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="软件系统" prop="softwareSys">
        <el-select v-model="queryParams.softwareSys" placeholder="请选择软件系统" clearable>
          <el-option
            v-for="dict in dict.type.pd_software_sys"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="需求描述" prop="demandDetail">
        <el-input
          v-model="queryParams.demandDetail"
          placeholder="请输入需求描述"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="分析原因" prop="reason">
        <el-input
          v-model="queryParams.reason"
          placeholder="请输入分析原因"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="处理结果" prop="result">
        <el-input
          v-model="queryParams.result"
          placeholder="请输入处理结果"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="结果标志" prop="demandFlag">
        <el-select v-model="queryParams.demandFlag" placeholder="请选择结果标志" clearable>
          <el-option
            v-for="dict in dict.type.pd_demand_status"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="接收人" prop="acceptPerson">
        <el-select v-model="queryParams.acceptPerson" placeholder="请选择接收人" clearable>
          <el-option
            v-for="dict in dict.type.pd_worker_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="处理人" prop="handlePerson">
        <el-select v-model="queryParams.handlePerson" placeholder="请选择处理人" clearable>
          <el-option
            v-for="dict in dict.type.pd_worker_dic"
            :key="dict.value"
            :label="dict.label"
            :value="dict.value"
          />
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="扩展字段1" prop="ext1">
        <el-input
          v-model="queryParams.ext1"
          placeholder="请输入扩展字段1"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="扩展字段2" prop="ext2">
        <el-input
          v-model="queryParams.ext2"
          placeholder="请输入扩展字段2"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="完成时间" prop="completeTime">
        <el-date-picker clearable
          v-model="queryParams.completeTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择完成时间">
        </el-date-picker>
      </el-form-item>
      <!-- <el-form-item label="创建人" prop="createdBy">
        <el-input
          v-model="queryParams.createdBy"
          placeholder="请输入创建人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="创建时间" prop="createdTime">
        <el-date-picker clearable
          v-model="queryParams.createdTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择创建时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="更新人" prop="updatedBy">
        <el-input
          v-model="queryParams.updatedBy"
          placeholder="请输入更新人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="更新时间" prop="updatedTime">
        <el-date-picker clearable
          v-model="queryParams.updatedTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择更新时间">
        </el-date-picker>
      </el-form-item> -->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['generator:list:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['generator:list:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['generator:list:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['generator:list:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="listList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="序号" align="center" prop="id" width="50"/>
      <el-table-column label="提交日期" align="center" prop="arrangeTime" width="100">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.arrangeTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="院区" align="center" prop="areaLocation" >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_area_location" :value="scope.row.areaLocation"/>
        </template>
      </el-table-column>
      <!-- <el-table-column label="主班人员" align="center" prop="mainClass">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_worker_dic" :value="scope.row.mainClass"/>
        </template>
      </el-table-column>
      <el-table-column label="副班人员" align="center" prop="deputyClass">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_worker_dic" :value="scope.row.deputyClass"/>
        </template>
      </el-table-column>
      <el-table-column label="分院人员" align="center" prop="otherClass">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_worker_dic" :value="scope.row.otherClass"/>
        </template>
      </el-table-column> -->
      <el-table-column label="提交时间" align="center" prop="arrangeTime" width="100">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.arrangeTime, '{h}:{i}:{s} ') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="提交科室" align="center" prop="arrangeDept">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_dept_dic" :value="scope.row.arrangeDept"/>
        </template>
      </el-table-column>
      <el-table-column label="提交人" align="center" prop="deptPresenter" />
      <el-table-column label="需求范围" align="center" prop="demandType">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_demand_type" :value="scope.row.demandType"/>
        </template>
      </el-table-column>
      <el-table-column label="软件系统" align="center" prop="softwareSys">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_software_sys" :value="scope.row.softwareSys"/>
        </template>
      </el-table-column>
      <el-table-column label="需求描述" align="center" prop="demandDetail" show-overflow-tooltip width="200" />
      <!-- <el-table-column label="分析原因" align="center" prop="reason" />
      <el-table-column label="处理结果" align="center" prop="result" /> -->
      <el-table-column label="结果标志" align="center" prop="demandFlag">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_demand_status" :value="scope.row.demandFlag"/>
        </template>
      </el-table-column>
      <el-table-column label="接收人" align="center" prop="acceptPerson">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_worker_dic" :value="scope.row.acceptPerson"/>
        </template>
      </el-table-column>
      <el-table-column label="处理人" align="center" prop="handlePerson">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.pd_worker_dic" :value="scope.row.handlePerson"/>
        </template>
      </el-table-column>
      <!-- <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column label="附件" align="center" prop="attchment" />
      <el-table-column label="扩展字段1" align="center" prop="ext1" />
      <el-table-column label="扩展字段2" align="center" prop="ext2" /> -->
      <el-table-column label="完成时间" align="center" prop="completeTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.completeTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="创建人" align="center" prop="createdBy" />
      <el-table-column label="创建时间" align="center" prop="createdTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="更新人" align="center" prop="updatedBy" />
      <el-table-column label="更新时间" align="center" prop="updatedTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-tickets"
            @click="handleUpdate(scope.row)"
          >详情</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改派单对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-divider ></el-divider>
        <el-button type="text">派单人填写</el-button>
        <el-row>
          <el-col :span="12">
            <!-- <el-form-item label="提交日期" prop="arrangeDate">
              <el-date-picker clearable
                v-model="form.arrangeDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="请选择提交日期">
              </el-date-picker>
            </el-form-item> -->
            <el-form-item label="提交时间" prop="arrangeTime">
              <el-date-picker clearable
                v-model="form.arrangeTime"
                type="datetime"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="请选择提交时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="院区" prop="areaLocation">
              <el-select v-model="form.areaLocation" placeholder="请选择院区">
                <el-option
                  v-for="dict in dict.type.pd_area_location"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <!-- <el-form-item label="主班人员" prop="mainClass">
              <el-select v-model="form.mainClass" placeholder="请选择主班人员">
                <el-option
                  v-for="dict in dict.type.pd_worker_dic"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item> -->
        <!-- <el-form-item label="副班人员" prop="deputyClass">
          <el-select v-model="form.deputyClass" placeholder="请选择副班人员">
            <el-option
              v-for="dict in dict.type.pd_worker_dic"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="分院人员" prop="otherClass">
          <el-select v-model="form.otherClass" placeholder="请选择分院人员">
            <el-option
              v-for="dict in dict.type.pd_worker_dic"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            ></el-option>
          </el-select>
        </el-form-item> -->
        <el-row>
          <el-col :span="12">
            <el-form-item label="提交科室" prop="arrangeDept">
              <el-select v-model="form.arrangeDept" placeholder="请选择提交科室">
                <el-option
                  v-for="dict in dict.type.pd_dept_dic"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="提交人" prop="deptPresenter">
              <el-input v-model="form.deptPresenter" placeholder="请输入科室提交人" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="需求范围" prop="demandType">
              <el-select v-model="form.demandType" placeholder="请选择需求范围">
                <el-option
                  v-for="dict in dict.type.pd_demand_type"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item v-if="form.demandType == 0" label="软件系统" prop="softwareSys">
              <el-select v-model="form.softwareSys" placeholder="请选择软件系统">
                <el-option
                  v-for="dict in dict.type.pd_software_sys"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="需求描述" prop="demandDetail">
          <el-input v-model="form.demandDetail" placeholder="请输入需求描述" />
        </el-form-item>
        
        
        <el-row>
          <el-col :span="12">
            <el-form-item label="接收人" prop="acceptPerson">
              <el-select v-model="form.acceptPerson" placeholder="请选择接收人">
                <el-option
                  v-for="dict in dict.type.pd_worker_dic"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="处理人" prop="handlePerson">
              <el-select v-model="form.handlePerson" placeholder="请选择处理人">
                <el-option
                  v-for="dict in dict.type.pd_worker_dic"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        
        
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="附件" prop="attchment">
          <el-input v-model="form.attchment" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <!-- <el-form-item label="扩展字段1" prop="ext1">
          <el-input v-model="form.ext1" placeholder="请输入扩展字段1" />
        </el-form-item>
        <el-form-item label="扩展字段2" prop="ext2">
          <el-input v-model="form.ext2" placeholder="请输入扩展字段2" />
        </el-form-item> -->
        
        <el-divider ></el-divider>
        <el-button type="text">处理人填写</el-button>
        <el-row>
          <el-col :span="12">
            <el-form-item label="结果标志" prop="demandFlag">
              <el-select v-model="form.demandFlag" placeholder="请选择结果标志">
                <el-option
                  v-for="dict in dict.type.pd_demand_status"
                  :key="dict.value"
                  :label="dict.label"
                  :value="parseInt(dict.value)"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="完成时间" prop="completeTime">
              <el-date-picker clearable
                v-model="form.completeTime"
                type="datetime"
                placeholder="请选择完成时间">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="分析原因" prop="reason">
          <el-input v-model="form.reason" placeholder="请输入分析原因" />
        </el-form-item>
        <el-form-item label="处理结果" prop="result">
          <el-input v-model="form.result" placeholder="请输入处理结果" />
        </el-form-item>
        
        <!-- <el-form-item label="创建人" prop="createdBy">
          <el-input v-model="form.createdBy" placeholder="请输入创建人" />
        </el-form-item>
        <el-form-item label="创建时间" prop="createdTime">
          <el-date-picker clearable
            v-model="form.createdTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择创建时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="更新人" prop="updatedBy">
          <el-input v-model="form.updatedBy" placeholder="请输入更新人" />
        </el-form-item>
        <el-form-item label="更新时间" prop="updatedTime">
          <el-date-picker clearable
            v-model="form.updatedTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择更新时间">
          </el-date-picker>
        </el-form-item> -->
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listList, getList, delList, addList, updateList } from "@/api/work/workList";

export default {
  name: "List",
  dicts: ['pd_worker_dic', 'pd_dept_dic', 'pd_demand_status', 'pd_demand_type', 'pd_software_sys', 'pd_area_location'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 派单表格数据
      listList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        arrangeDate: null,
        areaLocation: null,
        mainClass: null,
        deputyClass: null,
        otherClass: null,
        arrangeTime: null,
        arrangeDept: null,
        deptPresenter: null,
        demandType: null,
        softwareSys: null,
        demandDetail: null,
        reason: null,
        result: null,
        demandFlag: null,
        acceptPerson: null,
        handlePerson: null,
        attchment: null,
        ext1: null,
        ext2: null,
        completeTime: null,
        createdBy: null,
        createdTime: null,
        updatedBy: null,
        updatedTime: null
      },
      // 表单参数
      form: {
      },
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询派单列表 */
    getList() {
      this.loading = true;
      listList(this.queryParams).then(response => {
        this.listList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        arrangeDate: null,
        areaLocation: null,
        mainClass: null,
        deputyClass: null,
        otherClass: null,
        arrangeTime: null,
        arrangeDept: null,
        deptPresenter: null,
        demandType: null,
        softwareSys: null,
        demandDetail: null,
        reason: null,
        result: null,
        demandFlag: null,
        acceptPerson: null,
        handlePerson: null,
        remark: null,
        attchment: null,
        ext1: null,
        ext2: null,
        completeTime: null,
        createdBy: null,
        createdTime: null,
        updatedBy: null,
        updatedTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加派单";
      this.form.demandFlag = 1
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getList(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改派单";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateList(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addList(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除派单编号为"' + ids + '"的数据项？').then(function() {
        return delList(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('generator/list/export', {
        ...this.queryParams
      }, `list_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>